package com.soriya.nestlive.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

@EqualsAndHashCode(callSuper = true)
@Data
@TableName("nl_user")
public class UserEntity extends BaseEntity {

    @TableId(type = IdType.ASSIGN_ID)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    private String account;

    private String password;

    private String salt;

    private String nickname;

    private String avatar;

    private String description;

    private Integer gender;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date birth;

}
